package com.wlh.animation.userviews;

import com.wlh.animation.R;
import com.wlh.animation.demo.BaseDemoListAct;
import com.wlh.animation.demo.BottomPopListWindowAct;
import com.wlh.animation.demo.ListItemAnimAct1;
import com.wlh.animation.demo.MaxItemListViewAct;
import com.wlh.animation.demo.RectToCircleAct;
import com.wlh.animation.demo.SlideAnimAct1;
import com.wlh.animation.demo.SlideAnimAct2;
import com.wlh.animation.demo.SlideAnimAct3;
import com.wlh.animation.vector.LineVectorAnimationAct;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

/**
 * Created by weilh on 2019-07-05
 */
public class UserViewsMenuAct extends AppCompatActivity {
        private ListView list;
        @Override
        protected void onCreate(@Nullable Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_base_demo_list);
            setTitle("自定义View");
            list = (ListView) findViewById(R.id.list);
            list.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, new String[] {
                    "SetPolyToPoly"}
            ));
            final Context context = this;
            list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                @Override
                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                    switch (position) {
                        case 0:
                            startActivity(new Intent(context, SetPolyToPolyAct.class));
                            break;
                    }
                }
            });
        }

        private void toAct(Class<? extends Activity> activityCls) {
            startActivity(new Intent(this, activityCls));
        }
}
